package com.keyinong.caizhengting.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * @author luohao 作者：罗浩
 * @时间：2016-5-26.下午4:15:30
 * @类名：MeetingViewPagerAdapter.java
 * @功能：会议的ViewPager的适配器
 */
public class MeetingViewPagerAdapter extends FragmentPagerAdapter {
    ArrayList<Fragment> meetingList;
    FragmentManager fm;

    public MeetingViewPagerAdapter(FragmentManager fm, ArrayList<Fragment> meetingList) {
        super(fm);
        this.meetingList = meetingList;
        this.fm = fm;
    }


//	public void setFragments(ArrayList<Fragment> meetingList) {
//		if(this.meetingList != null){
//			FragmentTransaction ft = fm.beginTransaction();
//			for(Fragment f:this.meetingList){
//				ft.remove(f);
//			}
//			ft.commit();
//			ft=null;
//			fm.executePendingTransactions();
//		}
//		this.meetingList = meetingList;
//		notifyDataSetChanged();
//	}


    @Override
    public Fragment getItem(int arg0) {
        return meetingList.get(arg0);
    }

    @Override
    public int getCount() {
        return meetingList.size();
    }

    @Override
    public int getItemPosition(Object object) {
        // TODO Auto-generated method stub
        return POSITION_NONE;
    }


}


